package com.sym.spring.bean.dto;

/**
 * 作    者： yingming shen
 * 修改时间： 2020/6/2 0:27.
 * 描   述：
 */
public class ResultDTO<T> {

    private Integer code;

    private String msg;

    private T data;

    public ResultDTO() {
    }

    public static ResultDTO sucess(Object data) {
        ResultDTO<Object> resultDTO = new ResultDTO<>();
        resultDTO.setCode(100);
        resultDTO.setMsg("成功");
        resultDTO.setData(data);
        return resultDTO;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
